from common.browser import Browser
from pages.login_page_5i5j import LoginPage


class PublicMethod(object):
    def __init__(self):
        self.driver = Browser.open_driver("chrome")
        self.url = "http://base.iplus.chanjue.net/aist-sso-web/login?service=http://qingdao.iplus.chanjue.net/sales-web/cas"

    def login(self,username,password):
        login = LoginPage(self.driver)
        login.get(self.url)
        login.login_username_input.send_keys(username)
        login.login_password_input.send_keys(password)
        login.login_button.click()
